import React from 'react';
import { BrowserRouter, Route, Link, Switch } from 'react-router-dom';
import App from './pc/App';
import Login from './pc/Login';
import Index from './pc/index/Index';
import UserList from './pc/user/UserList';
import UserDetail from './pc/user/UserDetail';


export default class Router extends React.Component{
    render(){
        return (
            <BrowserRouter>
                <Switch>
                    <Route exact path='/' component={Login}/>
                    <App>
                        <Route path='/index' component={Index}/>
                        <Route path='/user' component={UserList}/>
                        <Route path='/user-detail/:username' component={UserDetail}/>                      
                    </App>
                </Switch>
            </BrowserRouter>
        )
    }
}